# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libvdpau
pkgver=1.4
pkgrel=1
pkgdesc="Nvidia VDPAU library"
arch=(x86_64)
url='https://www.freedesktop.org/wiki/Software/VDPAU/'
depends=('libxext')
license=('custom')
_commit=c3d1a9dbafdfe6144ff474d0d523dc01b068750f # 1.4
source=("git+https://gitlab.freedesktop.org/vdpau/libvdpau.git#tag=$_commit")
makedepends=('xorgproto' 'git' 'meson')
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

build() {
  arch-meson $pkgname build
  ninja -C build
}

check() {
  ninja -C build test
}

package() {
  DESTDIR="${pkgdir}" ninja -C build install
  install -Dm 644 $pkgname/COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
